<template>
	<div class="index">

		<div class="center">
			<left></left>
			<div class="right" >
          <top></top>
          <div class="hei10"></div>

          <div class="where" style="background: #fff; padding: 10px 30px; font-size: 14px; color: #595959;">
            当前位置：
            <router-link to="/index" style="color: #409eff;">分销后台</router-link>>
            <router-link to="/productionDelivery" style="color: #409eff;">在售商品管理</router-link>>
            修改佣金
          </div>
          <div class="hei10"></div>
          <div class="addpro">
            <div class="step" v-if="this.$route.query.type==1">
              <el-steps :active="3" align-center>
                <el-step title="定义基础产品信息" description="设置分类、定制生产规则"></el-step>
                <el-step title="定义销售页信息" description="对外宣传销售话术"></el-step>
                <el-step title="设定佣金及分销商可见" description="设置那些分销商可以销售，给多少佣金"></el-step>
                <el-step title="确认发布" description="上线销售发展用户"></el-step>
              </el-steps>
            </div>
            <div class="step" v-if="this.$route.query.type==2||this.$route.query.type==3">
              <el-steps  :active="2" align-center>
                <el-step title="定义销售页信息" description="对外宣传销售话术"></el-step>
                <el-step title="设定佣金及分销商可见" description="设置那些分销商可以销售，给多少佣金"></el-step>
                <el-step title="确认发布" description="上线销售发展用户"></el-step>
              </el-steps>
            </div>

          </div>
          <div class="hei10"></div>
          <div class="addpro" v-loading="loadingcon">

					<div class="step">
						<div class="tilte">修改佣金及分销商可见</div>
						<div class="con">
							<el-form ref="form"  :rules="rules" @submit.native.prevent :model="moneyform" label-width="150px">
								<el-form-item  label="分销商可见设置:"  prop="visible">
											<div style="display: flex;">
                        <div style="background-color:#F6F6F6;padding: 20px;width: 1000px;box-sizing: border-box;">
                          <el-radio-group v-model="moneyform.visible" @change="cardid">
                            <el-radio label="1">仅自己可见</el-radio>
                            <el-radio label="2">全部分销商可见</el-radio>
                            <el-radio label="3">选择的分销商可见</el-radio>
                            <el-radio label="4">选择的分销商不可见</el-radio>
                          </el-radio-group>
                          <div v-if="kejian">
                            <span style="color: #333333;margin-right: 20px;">已选择：{{ids.length}}条 </span><el-button @click="openchoosefx(1)" type="text">编辑</el-button>
                            <!-- <el-select v-model="ids" multiple filterable collapse-tags remote reserve-keyword placeholder="请选择分销商" >
                              <el-option v-for="item in moneylist" :key="item.child_shop_id" :label="item.merchant_name" :value="item.child_shop_id"></el-option>
                            </el-select> -->
                          </div>

                        </div>
												<div class="t_out_tips_box">
                          <div @click="openchoosefx(3)" style="color: #409EFF;cursor: pointer;">默认不可见商户:{{disablesee.length}}条</div>
                          <el-popover
                            placement="top-start"
                            title=""
                            width="400"
                            trigger="hover"
                            content="小黑屋，不论选择全部分销商可见，还是指定分销商不可见，在小黑屋里面的分销商都不
可见除非指定分销商可见小黑屋的商户才可见。（该设置全局通用，添加后之后每次发布或修改分销商可见该设置均生效，通常用于特殊分销商）。">
                            <div slot="reference" class="t_wen">?</div>
                          </el-popover>
                        </div>
											</div>
								</el-form-item>
                <!-- <el-form-item v-if="kejian" label="选择分销商:">
                    <el-select v-model="ids" multiple filterable collapse-tags remote reserve-keyword placeholder="请选择分销商" >
                      <el-option v-for="item in moneylist" :key="item.child_shop_id" :label="item.merchant_name" :value="item.child_shop_id"></el-option>
                    </el-select>
                </el-form-item> -->
								<!-- <div class="flex btm0" style="margin-bottom: 20px;">
                    <el-form-item label="佣金额度(老):"  prop="commission">
                      <el-input v-model="moneyform.commission" placeholder="佣金额度"></el-input>
                    </el-form-item>
                    <el-button type="primary"  size="mini" plain @click="log = true">分销商差异化佣金设置</el-button>
                    <el-tooltip class="item" effect="light" content="给予分销商的佣金额度" placement="top">
                      <span class="wenhao" style="display: block; height: 29px; width: 29px; padding: 0; line-height: 29px; margin-top: 5px;">?</span>
                    </el-tooltip>
								</div> -->
                <el-form-item label="佣金规则设置:">
                    <div v-for="item in bianjiyongjinlist" :key="item.id">
                        <div v-if="item.type == 1" class="bor3" style="width: 1000px;box-sizing: border-box;">{{item.name}}：
                        <span style="color: #409EFF; margin-right: 30px;">
                            <span v-if="item.rules != ''">{{item.rules}}</span>
                            <span v-if="item.active_commission > 0">已激活，佣金{{item.active_commission}}元。</span>
                            <span v-if="item.first_recharge_one > 0">首充大于{{item.first_recharge_one}}元，佣金{{item.first_recharge_one_commission}}元。</span>
                            <span v-if="item.first_recharge_two > 0">首充大于{{item.first_recharge_two}}元，佣金{{item.first_recharge_two_commission}}元。</span>
                            <span v-if="item.recharge_amount_one > 0">累计充值大于{{item.recharge_amount_one}}元，佣金{{item.recharge_amount_one_commission}}元。</span>
                            <span v-if="item.recharge_amount_two > 0">累计充值大于{{item.recharge_amount_two}}元，佣金{{item.recharge_amount_two_commission}}元。</span>
                        </span>
                        <el-button type="primary" size="mini" @click="bianjiyongjinchange(item)">编辑</el-button>
                        <el-button type="primary" size="mini" @click="shanchu(item.id)">删除</el-button>
                    </div></div>
                    <div style="width: 1000px;box-sizing: border-box;" v-for="item in bianjiyongjinlist" :key="item.id + 'x'">
                        <div v-if="item.type == 3" class="bor4">{{item.name}}：
                        <span style="color: #409EFF; margin-right: 30px;">
                            <span v-if="item.rules != ''">{{item.rules}}</span>
                            <span v-if="item.active_commission > 0">已激活，佣金{{item.active_commission}}元。</span>
                            <span v-if="item.first_recharge_one > 0">首充大于{{item.first_recharge_one}}元，佣金{{item.first_recharge_one_commission}}元。</span>
                            <span v-if="item.first_recharge_two > 0">首充大于{{item.first_recharge_two}}元，佣金{{item.first_recharge_two_commission}}元。</span>
                            <span v-if="item.recharge_amount_one > 0">累计充值大于{{item.recharge_amount_one}}元，佣金{{item.recharge_amount_one_commission}}元。</span>
                            <span v-if="item.recharge_amount_two > 0">累计充值大于{{item.recharge_amount_two}}元，佣金{{item.recharge_amount_two_commission}}元。</span>
                        </span>
                        <el-button type="primary" size="mini" @click="bianjiyongjinchange(item)">编辑</el-button>
                        <el-button type="primary" size="mini" @click="shanchu(item.id)">删除</el-button>
                    </div></div>
                    <div><el-button type="primary" size="mini" @click="bianjiyongjinlogshow">新增佣金规则</el-button></div>
                </el-form-item>
                <el-form-item label="佣金规则设置:">
                    <el-button type="primary" size="mini" @click="zhidingguize">为分销商指定规则</el-button>
                </el-form-item>
                <el-form-item label="提卡费:">
                    <el-input v-model="tika_cost" @input='dayu0' type="number" style="width: 200px;" placeholder="提卡费"></el-input>
                    <span style="color: #999; margin-left: 20px;">根据设置金额向分销商收取提卡费</span>
                </el-form-item>
                <el-form-item v-if="this.$route.query.type==1||this.$route.query.type==2||this.$route.query.type==3" label="上架通知:" class="shangjia" >
                  <el-checkbox v-model="moneyform.is_notice">给可见商品的分销商发送新商品上架通知</el-checkbox>
                </el-form-item>
							</el-form>
						</div>
					</div>
          <div class="step" v-if="this.$route.query.type==1||this.$route.query.type==2||this.$route.query.type==3" style="text-align: center;">
						<el-button type="danger" @click="bangding(1)" v-if="xianshang">发布商品</el-button>
					</div>
					<div v-else class="step" style="text-align: center;">
						<el-button type="danger" @click="bangding(0)">保存</el-button>
						<el-button type="danger" @click="bangding(1)" v-if="xianshang">保存且上架</el-button>
					</div>
				</div>
			</div>
		</div>

		<el-dialog title="商品的支出佣金设置" :visible.sync="log" width="600px">
			  <div class="loglist">
				  <div class="log_title">{{shopform.title}}产品的佣金设置</div>
				  <div class="search">
					  <div class="add">
					  	<el-input placeholder="分销商店铺名" v-model="search" class="input-with-select"></el-input>
					  	<el-button type="primary" @click="searchgo" icon="el-icon-search"></el-button>
					  </div>
				  </div>
			  </div>

			  <div class="con" v-loading="loading">
			  	<div class="list">
			  		<div class="th">分销商店铺</div>
			  		<div class="th">支出佣金</div>
			  	</div>
				<div class="listl">
					<div class="listl">
						<!-- 佣金设置列表 -->
						<div class="list" v-for="item in moneylist" :key="item.child_shop_id">
							<div class="td">{{item.name}}</div>

							<div class="td" v-if="item.commission_is_set == 1?true:false">
								{{item.commission}}
								<el-button type="primary" size="mini" plain style=" margin-left: 30px;" @click="fixmoney(item.child_shop_id)">修改</el-button>
							</div>
							<div class="td" v-if="item.commission_is_set != 1?true:false">
								默认佣金
								<el-button type="primary" size="mini" plain style=" margin-left: 30px;" @click="fixmoney(item.child_shop_id)">修改</el-button>
							</div>
						</div>
					</div>
				</div>
			  </div>

			  <span slot="footer" class="dialog-footer">
				<el-button type="primary" @click="log = false">确定</el-button>
			  </span>
		</el-dialog>

    <el-dialog :title="tit" :visible.sync="bianjiyongjinlog" :before-close="bianliyongjinlogclose" :close-on-click-modal="false" :close-on-press-escape="false" width="920px">
          <div style="margin-bottom: 20px; display: flex; ">
              <div style="width: 120px; line-height: 36px;">规则名称：</div>
              <div v-if="bianjiyongjinlist.length == 0 "><el-input v-model="first_rules.name" disabled placeholder="请输入规则名称"></el-input></div>
              <div v-if="bianjiyongjinlist.length != 0 "><el-input v-model="first_rules.name" placeholder="请输入规则名称"></el-input></div>
          </div>
          <div style="margin-bottom: 20px; display: flex; ">
            <div style="width: 120px; line-height: 36px;">佣金描述：</div>
            <div><el-input v-model="first_rules.rules" placeholder="请输入佣金描述"></el-input></div>
          </div>
          <div style="margin-bottom: 20px; display: flex;">
              <div style="width: 120px; line-height: 36px;">规则定义：</div>
              <div class="newcon">
                    <div class="newflex">
                        <div class="newflexli1" style="padding: 15px 0;">满足条件</div>
                        <div class="newflexli2" style="padding: 15px 0;">支出佣金</div>
                    </div>
                    <div class="newflex">
                        <div class="newflexli1 newflex2">
                            <div class="newflexli11"><el-checkbox v-model="active"  @change="change_active">已激活</el-checkbox></div>
                            <div class="newflexli12">  </div>
                        </div>
                        <div class="newflexli2"><el-input  type="number" :disabled="!active"  v-model="first_rules.active_commission" @input="inputchoose"  placeholder="请输入金额"></el-input></div>
                    </div>
                    <div class="newflex">
                        <div class="newflexli1 newflex2">
                            <div class="newflexli11"><el-checkbox v-model="first_recharge" @change="change_first_recharge">已首充</el-checkbox></div>
                            <div class="newflexli12">
                                <div>充值≥：<el-input :disabled="!first_recharge" v-model="first_rules.first_recharge_one" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                                <div>充值≥：<el-input :disabled="!first_recharge" v-model="first_rules.first_recharge_two" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                            </div>
                        </div>
                        <div class="newflexli2">
                            <div><el-input :disabled="!first_recharge" v-model="first_rules.first_recharge_one_commission" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                            <div><el-input :disabled="!first_recharge" v-model="first_rules.first_recharge_two_commission" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                        </div>
                    </div>
                    <div class="newflex">
                        <div class="newflexli1 newflex2">
                            <div class="newflexli11"><el-checkbox v-model="recharge_amount"  @change="change_recharge_amount">累计充值金额</el-checkbox></div>
                            <div class="newflexli12">
                                <div>充值≥：<el-input :disabled="!recharge_amount" v-model="first_rules.recharge_amount_one" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                                <div>充值≥：<el-input :disabled="!recharge_amount" v-model="first_rules.recharge_amount_two" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                            </div>
                        </div>
                        <div class="newflexli2">
                            <div><el-input :disabled="!recharge_amount" v-model="first_rules.recharge_amount_one_commission" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                            <div><el-input :disabled="!recharge_amount" v-model="first_rules.recharge_amount_two_commission" @input="inputchoose" placeholder="请输入金额"></el-input></div>
                        </div>
                    </div>

              </div>
            </div>
              <div class="newalt" style="margin-top: 20px;">
                当前设定规则：
                <span v-if="first_rules.rules != ''">{{first_rules.rules}}</span>
                <span v-if="active == true">已激活，佣金{{first_rules.active_commission}}元.</span>
                <span v-if="first_recharge == true">首充大于等于{{first_rules.first_recharge_one}}元，佣金{{first_rules.first_recharge_one_commission}}元</span>
                <span v-if="first_recharge == true">或者首充大于等于{{first_rules.first_recharge_two}}元，佣金{{first_rules.first_recharge_two_commission}}元.</span>
                <span v-if="recharge_amount == true">累计充值大于等于{{first_rules.recharge_amount_one}}元，佣金{{first_rules.recharge_amount_one_commission}}元</span>
                <span v-if="recharge_amount == true">且累计充值大于等于{{first_rules.recharge_amount_two}}元，佣金{{first_rules.recharge_amount_two_commission}}元.</span>
              </div>

              <div class="newalt" style="margin-top: 20px;" v-if="first_rules.start_at">
                定时生效： <span>{{first_rules2.start_at}}</span>
                <span v-if="first_rules2.rules != ''">{{first_rules2.rules}}</span>
                <span v-if="first_rules2.active_commission != 0 ">已激活，佣金{{first_rules2.active_commission}}元.</span>
                <span v-if="first_rules2.first_recharge_one != 0 || first_rules2.first_recharge_one_commission != 0 ">首充大于等于{{first_rules2.first_recharge_one}}元，佣金{{first_rules2.first_recharge_one_commission}}元</span>
                <span v-if="first_rules2.first_recharge_two != 0  || first_rules2.first_recharge_two_commission != 0 ">或者首充大于等于{{first_rules2.first_recharge_two}}元，佣金{{first_rules2.first_recharge_two_commission}}元.</span>
                <span v-if="first_rules2.recharge_amount_one != 0  || first_rules2.recharge_amount_one_commission != 0 ">累计充值大于等于{{first_rules2.recharge_amount_one}}元，佣金{{first_rules2.recharge_amount_one_commission}}元</span>
                <span v-if="first_rules2.recharge_amount_two != 0  || first_rules2.recharge_amount_two_commission != 0 ">且累计充值大于等于{{first_rules2.recharge_amount_two}}元，佣金{{first_rules2.recharge_amount_two_commission}}元.</span>
              </div>

          <span slot="footer" class="dialog-footer">
          	<el-button @click="bianjiyongjinlog = false">取 消</el-button>
            <el-button type="primary" @click="savefanli2" v-if="tit == '修改佣金规则'">定时生效</el-button>
          	<el-button type="primary" @click="savefanli" v-if="!first_rules.start_at">立即生效</el-button>
          </span>
    </el-dialog>
    <el-dialog title="编辑分销商佣金" :visible.sync="zidingyilog" :close-on-press-escape="false" :close-on-click-modal="false" width="800px">

      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">

          <el-tab-pane label="按佣金规则指定" name="first">

              <el-table :data="bianjiyongjinlist" border style="width: 100%">
                  <el-table-column prop="name" label="规则名称" width="180"></el-table-column>
                  <el-table-column>
                    <template slot-scope="scope">
                           <span v-if="scope.row.rules != ''">{{scope.row.rules}}</span>
                           <span v-if="scope.row.active_commission > 0">已激活，佣金{{scope.row.active_commission}}元。</span>
                           <span v-if="scope.row.first_recharge_one > 0">首充大于{{scope.row.first_recharge_one}}元，佣金{{scope.row.first_recharge_one_commission}}元。</span>
                           <span v-if="scope.row.first_recharge_two > 0">首充大于{{scope.row.first_recharge_two}}元，佣金{{scope.row.first_recharge_two_commission}}元。</span>
                           <span v-if="scope.row.recharge_amount_one > 0">累计充值大于{{scope.row.recharge_amount_one}}元，佣金{{scope.row.recharge_amount_one_commission}}元。</span>
                           <span v-if="scope.row.recharge_amount_two > 0">累计充值大于{{scope.row.recharge_amount_two}}元，佣金{{scope.row.recharge_amount_two_commission}}元。</span>
                    </template>
                  </el-table-column>
                  <el-table-column>
                    <template slot-scope="scope">
                        <span>已选择：{{scope.row.num}}条</span>
                        <el-button type="text" size="mini" @click="openchoosefx(2,scope.row)">管理</el-button>
                        <!-- <el-button type="text" size="mini" @click="guanli(scope.row)">管理</el-button> -->
                    </template>
                  </el-table-column>
              </el-table>
          </el-tab-pane>
          <el-tab-pane label="按分销商指定" name="second">
            <div class="zidingyiflex">
                <el-input placeholder="分销商店铺名" v-model="search" style="width: 250px; margin-right: 10px;"></el-input>
                <el-button type="primary" @click="searchgo" style="padding: 10px 20px;" icon="el-icon-search"></el-button>
            </div>
            <div class="zidingyiflex" style="background: #EAEAEA; margin-top: 20px; border-left: 1px #ccc solid;">
                <div class="zidingyitd">分销商店铺</div>
                <div class="zidingyitd" style="flex: 3;">当前佣金</div>
                <div class="zidingyitd">编辑</div>
            </div>
            <div class="zidingyiflex" style="border-left: 1px #ccc solid;"  v-for="item in shoplist" :key="item.child_shop_id">

                <div class="zidingyitd">{{item.merchant_name}}</div>
                <div class="zidingyitd" v-if="item.config_id == 0" style="flex: 3;">
                    <span>默认规则：</span>
                    <span v-if="morenyongjin.rules != ''">{{morenyongjin.rules}}</span>
                    <span v-if="morenyongjin.active_commission > 0">已激活，佣金{{morenyongjin.active_commission}}元.</span>
                    <span v-if="morenyongjin.first_recharge_one > 0">首充大于{{morenyongjin.first_recharge_one}}元，佣金{{morenyongjin.first_recharge_one_commission}}元或者</span>
                    <span v-if="morenyongjin.first_recharge_two > 0">首充大于{{morenyongjin.first_recharge_two}}元，佣金{{morenyongjin.first_recharge_two_commission}}元.</span>
                    <span v-if="morenyongjin.recharge_amount_one > 0">累计充值大于{{morenyongjin.recharge_amount_one}}元，佣金{{morenyongjin.recharge_amount_one_commission}}元且</span>
                    <span v-if="morenyongjin.recharge_amount_two > 0">累计充值大于{{morenyongjin.recharge_amount_two}}元，佣金{{morenyongjin.recharge_amount_two_commission}}元.</span>
                </div>
                <div class="zidingyitd" v-if="item.config_id != 0" style="flex: 3;">
                  <span>{{item.name}}：</span>
                  <span v-if="item.rules != ''">{{item.rules}}</span>
                  <span v-if="item.active_commission > 0">已激活，佣金{{item.active_commission}}元.</span>
                  <span v-if="item.first_recharge_one > 0">首充大于{{item.first_recharge_one}}元，佣金{{item.first_recharge_one_commission}}元或者</span>
                  <span v-if="item.first_recharge_two > 0">首充大于{{item.first_recharge_two}}元，佣金{{item.first_recharge_two_commission}}元.</span>
                  <span v-if="item.recharge_amount_one > 0">累计充值大于{{item.recharge_amount_one}}元，佣金{{item.recharge_amount_one_commission}}元且</span>
                  <span v-if="item.recharge_amount_two > 0">累计充值大于{{item.recharge_amount_two}}元，佣金{{item.recharge_amount_two_commission}}元.</span>
                </div>
                <div class="zidingyitd" ><el-button type="text" @click="zidingyibianji(item.config_id,item.child_shop_id)">编辑</el-button></div>

            </div>
          </el-tab-pane>
      </el-tabs>



    </el-dialog>

    <el-dialog title="根据佣金规则管理代理商" :visible.sync="guizelistlog" :close-on-press-escape="false" :close-on-click-modal="false" width="800px">
        <el-button type="primary" size="mini" @click="tianjiadailishang()">添加代理商</el-button>
        <el-table :data="genjuguize" border style="width: 100%; margin-top: 20px;">
            <el-table-column prop="merchant_name" label="代理商" ></el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                  <el-button type="primary" size="mini" @click="guanlishan(scope.row)" v-if="scope.row.type == 3">删除</el-button>
              </template>
            </el-table-column>
        </el-table>
    </el-dialog>

    <el-dialog title="根据佣金规则管理代理商" :visible.sync="tianjiadailishanglog" :close-on-press-escape="false" :close-on-click-modal="false" width="800px">
        <el-select v-model="xin.child_shop_id" filterable placeholder="请选择">
            <el-option v-for="item in shoplist" :key="item.child_shop_id" :label="item.merchant_name"  :value="item.child_shop_id"> </el-option>
        </el-select>
        <span slot="footer" class="dialog-footer">
        	<el-button @click="tianjiadailishanglog = false">取 消</el-button>
        	<el-button type="primary" @click="tianjiadailishanggo">确 定</el-button>
        </span>
    </el-dialog>


    <el-dialog title="自定义编辑" :visible.sync="zidingyixuanzelog" :close-on-press-escape="false" :close-on-click-modal="false" width="800px">
        <div v-for="item in bianjiyongjinlist" :key="item.id">
              <el-radio v-model="zidingyiradio" :label="item.id" style="margin: 20px;">{{item.name}}</el-radio>
        </div>
        <span slot="footer" class="dialog-footer">
        	<el-button @click="zidingyixuanzelog = false">取 消</el-button>
        	<el-button type="primary" @click="zidingyiradiook">确 定</el-button>
        </span>
    </el-dialog>

    <el-dialog title="定时生效时间设置" :visible.sync="dingshilog" :close-on-press-escape="false" :close-on-click-modal="false" width="600px">
        <el-date-picker v-model="dingshi" type="datetime" value-format="yyyy-MM-dd HH:mm" placeholder="选择日期时间"></el-date-picker>
        <span slot="footer" class="dialog-footer">
        	<el-button @click="dingshilog = false">取 消</el-button>
        	<el-button type="primary" @click="savefanli2ok">确 定</el-button>
        </span>
    </el-dialog>
		<!-- <foot></foot> -->
    <!-- 选择分销商弹窗 -->
    <el-dialog
      title="指定分销商"
      :visible.sync="isshowfxs"
      width="800px">
      <div class="t_fenxiao_all">
        <div class="t_fx_tab" >
          <el-input @input="shaipeo" v-model="searchallpeo" v-if="fxtype==1||fxtype==3||fxtype==5" style="margin-top: 30px;" size="small" placeholder="请输入内容"  >
            <el-button slot="prepend" icon="el-icon-search"></el-button>
          </el-input>
          <div class="t_choose_btn_box" v-if="fxtype==1">
            <div class="t_choose_type" @click="changetype(2)">
              <img src="../../../static/img/qz.png" alt="">
              按群组选
            </div>
            <div  class="t_choose_type" @click="changetype(4)">
              <img src="../../../static/img/bq.png" alt="">
              按标签选
            </div>
          </div>
          <!-- 分类标题 -->
          <div class="t_all_type_title" v-if="fxtype!=1">
            <i class="el-icon-arrow-left t_back_tab" @click="backtab"></i>  {{ fxtypetitle }}
          </div>


          <div class="t_fx_all">
            <!-- 分类列表 -->
            <div v-if="fxtype==2||fxtype==4">
              <div class="t_type_list_item" v-for="(item,index) in fx_type_list" :key="index" @click="getdetpeo(item)">
                <div>
                  <span style="margin-right: 20px;">{{ item.title }}</span><span style="color: #6C6C6C;">（{{item.total_num.length}}）</span>
                </div>
                <div style="color: #5596FF;">成员</div>
              </div>
            </div>
            <div v-if="searchallpeo==''">
              <!-- 全部成员 -->
              <div class="t_fx_item" v-if="fxtype==1" v-for="(item,index) in moneylist" :key="index">
                <el-checkbox v-model="item.ischecked" @change="changechoose($event,item)" style="margin-right: 10px;" ></el-checkbox>
                {{  item.merchant_name}}
              </div>
              <!-- 分组成员 -->
              <div class="t_fx_item" v-if="fxtype==3" >
                <el-checkbox v-model="allfzpeocheck" @change="changechoose($event,'全选')" style="margin-right: 10px;" ></el-checkbox>
                全选
              </div>
              <div class="t_fx_item" v-if="fxtype==3" v-for="(item,index) in fenzupeo" :key="index">
                <el-checkbox v-model="item.ischecked" @change="changechoose($event,item)" style="margin-right: 10px;" ></el-checkbox>
                {{  item.user_name}}
              </div>
              <!-- 标签成员 -->
              <div class="t_fx_item" v-if="fxtype==5" >
                <el-checkbox v-model="alltagpeocheck" @change="changechoose($event,'全选')" style="margin-right: 10px;" ></el-checkbox>
                全选
              </div>
              <div class="t_fx_item" v-if="fxtype==5" v-for="(item,index) in fentagpeo" :key="index">
                <el-checkbox v-model="item.ischecked" @change="changechoose($event,item)" style="margin-right: 10px;" ></el-checkbox>
                {{  item.user_name}}
              </div>
            </div>
            <div v-else>
              <!-- 筛选成员 -->
              <div class="t_fx_item"  v-for="(item,index) in shaipeolist" :key="index">
                <el-checkbox v-model="item.ischecked" @change="changechoose($event,item)" style="margin-right: 10px;" ></el-checkbox>
                <span v-if="fxtype==1">{{  item.merchant_name}}</span>
                <span v-if="fxtype==3||fxtype==5">{{  item.user_name}}</span>
              </div>
            </div>
          </div>
        </div>
        <div class="t_fx_tab" >
          <div>已选择（{{ids_t.length}}）</div>
          <el-input @input="shaitag" v-model="searchhavepeo" style="margin-top: 10px;margin-bottom: 10px;" size="small" placeholder="请输入内容"  >
            <el-button slot="prepend" icon="el-icon-search"></el-button>
          </el-input>

          <div v-if="searchhavepeo==''" class="t_fx_all">
            <el-tag
              class="t_choose_tag"
              v-for="(item,index) in ids_t" :key="index"
              closable
              @close="closetag(item)"
              type="info">
              {{item.name}}
            </el-tag>
          </div>
          <div v-else class="t_fx_all">
            <el-tag
              class="t_choose_tag"
              v-for="(item,index) in ids_t_s" :key="index"
              closable
              @close="closetag(item)"
              type="info">
              {{item.name}}
            </el-tag>
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="info" round @click="isshowfxs = false">取 消</el-button>
        <el-button type="danger" round @click="updatefx">确 定</el-button>
      </span>
    </el-dialog>
	</div>
</template>

<script>
	import { provinceAndCityDataPlus, CodeToText, TextToCode } from 'element-china-area-data'
	import UploadExcelComponent from "@/components/UploadExcel/index.vue";
	import E from 'wangeditor'
	import axios from 'axios'
	import top from '@/components/top.vue'
	import left from '@/components/left.vue'
	import foot from '@/components/foot.vue'
	export default{
		components: {
			"foot": foot,
			"left": left,
			"top": top,
			UploadExcelComponent
		},
		name: 'fixproductmoney',
		data(){
			return{

        child_shop_id:"",
        zidingyixuanzelog:false,
        shoplist:"",
        zidingyiradio:"1",
        zidingyilog:false,
        bianjiyongjinlog:false,
        bianjiyongjinlist:"",
        morenyongjin:"",
				ids:[],
				idslist:"",

				moneylist:"",

				taglog:false,
				taglist:['类型1','类型2'],
				inputVisible: false,
				inputValue: '',

				mingan:{
					city:"",
					citys:[],
					fixcitys:[]
				},
				randomnum:"",
				search:"",

				log:false,
				loading:false,
				rules: {
				  operator: [{ required: true, message: '必选', trigger: 'change' }],
				  name: [{ required: true, message: '必填', trigger: 'blur' }],
				  sku: [{ required: true, message: '必填', trigger: 'blur' }],
				  city: [{ required: true, message: '请选择活动区域', trigger: 'change' }],
				  real_name_type: [{ required: true, message: '请输入', trigger: 'change' }],
				  randomnum: [{ required: true, message: '请输入抓单码', trigger: 'change' }],
				  // title: [{ required: true, message: '必填', trigger: 'change' }],
				  is_need_photo: [{ required: true, message: '必选', trigger: 'change' }],
				  img: [{ required: true, message: '必选', trigger: 'change' }],
				  edit: [{ required: true, message: '必填', trigger: 'change' }],
				  visible: [{ required: true, message: '必选', trigger: 'change' }],
				  commission: [{ required: true, message: '必选', trigger: 'change' }],
				},

        active:false,
        first_recharge:false,
        recharge_amount:false,
        first_rules:{
          rules:"",
          name:"",
          active_commission:0,
          first_recharge_one:0,
          first_recharge_one_commission:0,
          first_recharge_two:0,
          first_recharge_two_commission:0,
          recharge_amount_one:0,
          recharge_amount_one_commission:0,
          recharge_amount_two:0,
          recharge_amount_two_commission:0,
          start_at:""
        },
        first_rules2:{},
        rebate_rule:"",
				shopform:{
					product_id:"",
					title:"",
					status:"",
					parent_id:"",
					selling_point:"",
					commission_rule:"",
					is_need_photo:"0",
					description:"",
					image1:0,
					imageUrl: '',
					imageUrl2: '',
				},
				moneyform:{
					order_page_id:"",
					visible:'1',
					commission:0,
					child_shop_ids:"",
					dislist:"",
					money:"",
					list:"",
          is_notice:true
				},
        tika_cost:"",
				// rules: {
				//   operator: [{ required: true, message: '必选', trigger: 'change' }],
				//   name: [{ required: true, message: '必填', trigger: 'blur' }],
				//   sku: [{ required: true, message: '必填', trigger: 'blur' }],
				//   city: [{ required: true, message: '请选择活动区域', trigger: 'change' }],
				//   real_name_type: [{ required: true, message: '请输入', trigger: 'change' }],
				//   randomnum: [{ required: true, message: '请输入抓单码', trigger: 'change' }],
				//   // title: [{ required: true, message: '必填', trigger: 'change' }],
				//   is_need_photo: [{ required: true, message: '必选', trigger: 'change' }],
				//   img: [{ required: true, message: '必选', trigger: 'change' }],
				//   edit: [{ required: true, message: '必填', trigger: 'change' }],
				//   visible: [{ required: true, message: '必选', trigger: 'change' }],
				//   commission: [{ required: true, message: '必选', trigger: 'change' }],
				// },

				kejian:false,
				sub1:true,
				sub2:true,
				sub3:true,
				showmoney:false,
				sanlist:[
					// {name:"中国联通",id:10000},
					// {name:"中国移动",id:10086},
					// {name:"中国电信",id:10010},
					{name:"中国广电",id:10099}
				],
				stat:0,
        stats:0,
        xianshang:true,
        loadingcon:true,

        shop_id:"",
        tit:"增加佣金规则",
        dingshilog:false,
        dingshi:"",
        dingshidata:"",

        genjuguize:[],
        guizelistlog:false,
        tianjiadailishanglog:false,
        xin:{
          order_page_id: "",
          child_shop_id: "",
          config_id: ""
        },
         activeName:"first",
        //  指定分销商弹窗
         isshowfxs:false,
         ids_t:[],
         fxtype:1,//1全部，2选组，3组成员，4选标签，5标签成员
         fxtypetitle:'',
         fx_type_list:[],
         fenzupeo:[],
         fentagpeo:[],
         searchhavepeo:'',
         ids_t_s:[],
         searchallpeo:'',
         shaipeolist:[],
         allfzpeocheck:false,
         alltagpeocheck:false,
         fromtype:null,
         disablesee:[
            {
              child_shop_id:50495,
              merchant_name:'唯一1级',
              name:'唯一1级'
            },
            {
              child_shop_id:50440,
              merchant_name:'lin3',
              name:'lin3'
            }
         ]
			}
		},
		created() {
				//获取分销商和佣金idslist
				// this.getmoneylist2();
        this.getmoneylist();
        //获取返利规则
        this.getfanli()
		},
		mounted() {

			//获取商品详情后追加内容
			var that = this;

			this.getdetail()
      //获取不可见list
      // this.getdisablesee()

		},
		methods:{
      guanlishan:function(item){
        var that = this
        this.$confirm('此操作将永久删除, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          console.log(item)
          //管理删除
          axios.post('/api/plan-market/order-page/commissions/update',{
            order_page_id: this.$route.query.id,
            child_shop_id: item.child_shop_id,
            config_id: 0
          })
          	.then(response => {
          		if(response.data.msg.code == 0){
                this.$message({
                  message: '删除成功！',
                  type: 'success'
                });
                this.getmoneylist()
                //添加后重新获取一下列表
                axios.get('/api/plan-market/order-page/commissions?_page_size=2000&order_page_id='+this.$route.query.id+'&config_id='+this.xin.config_id)
                	.then(response => {
                		if(response.data.msg.code == 0){
                      this.genjuguize = response.data.data.data

                		}else{
                			this.$message.error(response.data.msg.info);
                		}
                	})

                this.tianjiadailishanglog = false
          		}else{
          			this.$message.error(response.data.msg.info);
          		}
          	})
        })


      },
      tianjiadailishang:function(){
        this.tianjiadailishanglog = true
      },
      tianjiadailishanggo:function(){
        axios.post('/api/plan-market/order-page/commissions/update',this.xin)
        	.then(response => {
        		if(response.data.msg.code == 0){
              this.$message({
                message: '保存成功！',
                type: 'success'
              });
              this.getmoneylist()
              //添加后重新获取一下列表
              axios.get('/api/plan-market/order-page/commissions?_page_size=2000&order_page_id='+this.$route.query.id+'&config_id='+this.xin.config_id)
              	.then(response => {
              		if(response.data.msg.code == 0){
                    this.genjuguize = response.data.data.data

              		}else{
              			this.$message.error(response.data.msg.info);
              		}
              	})

              this.tianjiadailishanglog = false
        		}else{
        			this.$message.error(response.data.msg.info);
        		}
        	})
      },
      guanli:function(item){
        console.log(item)
        if(item.type == 1){
          this.xin.config_id = 0
        }else{
          this.xin.config_id = item.id
        }
        this.xin.order_page_id = this.$route.query.id

        this.xin.child_shop_id = ""

        //获取列表genjuguize
        // /api/plan-market/order-page/commissions?_page_size=2000&order_page_id=613626&name=
        axios.get('/api/plan-market/order-page/commissions?_page_size=2000&order_page_id='+this.$route.query.id+'&config_id='+this.xin.config_id)
        	.then(response => {
        		if(response.data.msg.code == 0){
              this.genjuguize = response.data.data.data
              this.guizelistlog = true

        		}else{
        			this.$message.error(response.data.msg.info);
        		}
        	})

      },


      change_active:function(){
        if(!this.active){
          this.first_rules.active_commission = 0
        }
      },
      change_first_recharge:function(){
        if(!this.first_recharge){
          this.first_rules.first_recharge_one = 0
          this.first_rules.first_recharge_two = 0
          this.first_rules.first_recharge_one_commission = 0
          this.first_rules.first_recharge_two_commission = 0
        }
      },
      change_recharge_amount:function(){
        if(!this.recharge_amount){
          this.first_rules.recharge_amount_one = 0
          this.first_rules.recharge_amount_two = 0
          this.first_rules.recharge_amount_one_commission = 0
          this.first_rules.recharge_amount_two_commission = 0
        }
      },

      shanchu:function(id){
        var that = this
        this.$confirm('此操作将永久删除, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          axios.post('/api/plan-market/commission/page/configs/delete',{id:id})
          	.then(response => {
          		if(response.data.msg.code == 0){
                this.getfanli()
                that.$message({
                  message: '删除成功！',
                  type: 'success'
                });
          		}else{
          			that.$message.error(response.data.msg.info);
          		}
          	})
        })

      },
      getdetail:async function(){
        var that = this
        await this.gettikafei();
        await axios.get('/api/plan-market/order-page/shops?order_page_id='+this.$route.query.id)
              .then(response => {
                    if(response.data.msg.code == 0){
                      if(response.data.data.visible == 0){response.data.data.visible = "1"}
                      if(response.data.data.visible == 1){response.data.data.visible = "1"}
                      if(response.data.data.visible == 2){response.data.data.visible = "2"}
                      if(response.data.data.visible == 3){response.data.data.visible = "3"}
                      if(response.data.data.visible == 4){response.data.data.visible = "4"}
                      that.moneyform = response.data.data

                      if(that.moneyform.visible == 3 || that.moneyform.visible == 4){that.kejian = true}
                      if(that.moneyform.visible == 1 || that.moneyform.visible == 2){that.kejian = false}

                      that.$set(that.moneyform,'is_notice',true)


                      //获取到分销商可见或者不可见 插入到ids
                      // var arr =[]
                      // for( var i in that.moneyform.child_shops){
                      //   arr.push(that.moneyform.child_shops[i].child_shop_id)
                      // }
                      this.ids = that.moneyform.child_shops

                      console.log('不可见列表')
                      console.log(response.data.data.invisible_user)
                      this.disablesee = response.data.data.invisible_user
                    }else{
                      that.$message.error(response.data.msg.info);
                    }
                })
      },
      dayu0:function(){
        if(this.tika_cost < 0){
          this.tika_cost = 0
        }
      },
      bianjiyongjinlogshow:function(){
        this.active = false
        this.first_recharge = false
        this.recharge_amount = false
        this.first_rules = {
        					name: "",
        					active_commission: 0,
        					first_recharge_one: 0,
        					first_recharge_one_commission: 0,
        					first_recharge_two: 0,
        					first_recharge_two_commission: 0,
        					recharge_amount_one: 0,
        					recharge_amount_one_commission: 0,
        					recharge_amount_two: 0,
        					recharge_amount_two_commission: 0
        }
        this.tit = '新增佣金规则'
        if(this.bianjiyongjinlist.length == 0){
            console.log(this.first_rules)
            this.first_rules.name = '默认规则'
        }
        this.bianjiyongjinlog = true
      },
      zidingyiradiook:function(){
          var that = this;
          var formData = new FormData();
          formData.append("order_page_id",this.$route.query.id);
          formData.append("child_shop_id",this.child_shop_id);
          formData.append("config_id",this.zidingyiradio);

          axios.post('/api/plan-market/order-page/commissions/update',formData)
          	.then(response => {
          		if(response.data.msg.code == 0){
                that.$message({
                  message: '保存成功！',
                  type: 'success'
                });
                that.searchgo()
                that.zidingyilog = false
                that.zidingyixuanzelog = false
          		}else{
          			that.$message.error(response.data.msg.info);
          		}
          	})
      },
      zidingyibianji:function(id,child_shop_id){
          this.child_shop_id = child_shop_id
          this.zidingyiradio = id
          this.zidingyixuanzelog = true
      },
      //指定规则
      zhidingguize:function(){
          if(this.bianjiyongjinlist == ''){
              this.$message.error('没有规则，请先添加规则');
              return false
          }
          this.zidingyilog = true
      },
      //关闭添加佣金规则弹框
      bianliyongjinlogclose:function(){
          this.first_rules = {
            rules:"",
            name:"",
            active_commission:0,
            first_recharge_one:0,
            first_recharge_one_commission:0,
            first_recharge_two:0,
            first_recharge_two_commission:0,
            recharge_amount_one:0,
            recharge_amount_one_commission:0,
            recharge_amount_two:0,
            recharge_amount_two_commission:0
          }
          this.bianjiyongjinlog = false
      },
      //输入时的选中
      inputchoose:function(){
        if(this.first_rules.active_commission < 0 ){ this.first_rules.active_commission = 0}
        if(this.first_rules.first_recharge_one_commission < 0 ){ this.first_rules.first_recharge_one_commission = 0}
        if(this.first_rules.first_recharge_one < 0 ){ this.first_rules.first_recharge_one = 0}
        if(this.first_rules.first_recharge_two < 0 ){ this.first_rules.first_recharge_two = 0}
        if(this.first_rules.first_recharge_two_commission < 0 ){ this.first_rules.first_recharge_two_commission = 0}

        if(this.first_rules.recharge_amount_one < 0 ){ this.first_rules.recharge_amount_one = 0}
        if(this.first_rules.recharge_amount_one_commission < 0 ){ this.first_rules.recharge_amount_one_commission = 0}
        if(this.first_rules.recharge_amount_two < 0 ){ this.first_rules.recharge_amount_two = 0}
        if(this.first_rules.recharge_amount_two_commission < 0 ){ this.first_rules.recharge_amount_two_commission = 0}


        if(this.first_rules.first_recharge_one != 0 && this.first_rules.first_recharge_one != ''){this.first_recharge = true}
        if(this.first_rules.first_recharge_one_commission != 0 && this.first_rules.first_recharge_one_commission != ''){this.first_recharge = true}
        if(this.first_rules.first_recharge_two != 0 && this.first_rules.first_recharge_two != ''){this.first_recharge = true}
        if(this.first_rules.first_recharge_two_commission != 0 && this.first_rules.first_recharge_two_commission != ''){this.first_recharge = true}

        if(this.first_rules.recharge_amount_one != 0 && this.first_rules.recharge_amount_one != ''){this.recharge_amount = true}
        if(this.first_rules.recharge_amount_one_commission != 0 && this.first_rules.recharge_amount_one_commission != ''){this.recharge_amount = true}
        if(this.first_rules.recharge_amount_two != 0 && this.first_rules.recharge_amount_two != ''){this.recharge_amount = true}
        if(this.first_rules.recharge_amount_two_commission != 0 && this.first_rules.recharge_amount_two_commission != ''){this.recharge_amount = true}
      },
      getfanli:function(){
        //先获取一下商品返利
        var that = this
        axios.get('/api/plan-market/commission/page/configs?page_id='+this.$route.query.id)
        	.then(response => {
        		if(response.data.msg.code == 0){
                if(response.data.data.rules != null){
                  that.bianjiyongjinlist = response.data.data.rules
                  for(var i = 0; i <that.bianjiyongjinlist.length; i++){
                    if(that.bianjiyongjinlist[i].type == 1){
                      that.morenyongjin = that.bianjiyongjinlist[i]
                    }

                  }
                  that.inputchoose()
                  that.loadingcon = false

                  that.first_rules = {
                    name:"",
                    active_commission:0,
                    first_recharge_one:0,
                    first_recharge_one_commission:0,
                    first_recharge_two:0,
                    first_recharge_two_commission:0,
                    recharge_amount_one:0,
                    recharge_amount_one_commission:0,
                    recharge_amount_two:0,
                    recharge_amount_two_commission:0
                  }
                }
        		}else{
        			that.$message.error(response.data.msg.info);
        		}
        	})
      },
      //编辑佣金选择自动添加入内容
      bianjiyongjinchange:async function(d){

          await axios.get('/api/plan-market/commission/page/configs/cron/get?config_id='+d.id)
        	.then(response => {
              if(response.data.msg.code == 0){
                this.active = false
                this.first_recharge = false
                this.recharge_amount = false
                this.first_rules = JSON.parse(JSON.stringify(d))
                if(this.first_rules.active_commission > 0 ){ this.active = true}
                if(this.first_rules.first_recharge_one > 0 || this.first_rules.first_recharge_two > 0 || this.first_rules.first_recharge_one_commission > 0 || this.first_rules.first_recharge_two_commission > 0){ this.first_recharge = true}
                if(this.first_rules.recharge_amount_one > 0 || this.first_rules.recharge_amount_two > 0 || this.first_rules.recharge_amount_one_commission > 0 || this.first_rules.recharge_amount_two_commission > 0){ this.recharge_amount = true}


                if(response.data.data != null && response.data.data != ''){

                  this.$set(this.first_rules,'start_at',response.data.data.start_at)
                  this.first_rules2 = response.data.data
                  console.log(this.first_rules2)
                }

                this.tit = '修改佣金规则'

                this.inputchoose()
                this.bianjiyongjinlog = true

              }else{
                  this.$message.error(response.data.msg.info);
              }
        	})


      },
      //保存返利规则
      savefanli:function(){

        let shop_id = JSON.parse(localStorage.getItem('SHOP')).shop_id;

        if((shop_id == 304676 || shop_id == 50481) && !this.first_rules.rules){
          this.$message.error("请填写佣金描述");
          return false
        }
      	var that = this
        var datas = {}
        datas['page_id'] = this.$route.query.id
        if(this.bianjiyongjinlist.length == 0 || this.first_rules.type == 1){
            datas['type'] = 1
        }else{
            datas['type'] = 3
        }
        datas['rules'] = this.first_rules

        axios.post('/api/plan-market/commission/page/configs',datas)
        	.then(response => {
              if(response.data.msg.code == 0){
                  that.loadingcon = false
                  that.getfanli()
                  that.$message.success("保存成功！");
                  that.bianjiyongjinlog = false
              }else{
                  that.$message.error(response.data.msg.info);
              }
        	})
      },

      savefanli2ok:function(){
          this.$set(this.first_rules,'start_at',this.dingshi)

          axios.post('/api/plan-market/commission/page/configs/cron',this.dingshidata)
          	.then(response => {
                if(response.data.msg.code == 0){
                    this.loadingcon = false
                    this.getfanli()
                    this.$message.success("保存成功！");
                    this.bianjiyongjinlog = false
                    this.dingshilog = false
                }else{
                    this.$message.error(response.data.msg.info);
                }
          	})

          // axios.post('/api/plan-market/commission/page/configs',this.dingshidata)
          // 	.then(response => {
          //       if(response.data.msg.code == 0){
          //           this.loadingcon = false
          //           this.getfanli()
          //           this.$message.success("保存成功！");
          //           this.bianjiyongjinlog = false
          //           this.dingshilog = false
          //       }else{
          //           this.$message.error(response.data.msg.info);
          //       }
          // 	})
      },
      savefanli2:function(){
        var that = this
        var datas = {}
        datas['page_id'] = this.$route.query.id
        if(this.bianjiyongjinlist.length == 0 || this.first_rules.type == 1){
            datas['type'] = 1
        }else{
            datas['type'] = 3
        }
        datas['rules'] = this.first_rules

        this.dingshidata = datas
        this.dingshilog = true
        this.dingshi = ''

      },

			//搜索功能
			searchgo:function(){
				this.loading = true
				this.getmoneylist();
			},

      //获取商品品详情
      getshopdetail:function(){
        var that = this;
        axios.get('/api/plan-market/order-page?order_page_id='+this.$route.query.id)
          .then(response => {
            if(response.data.msg.code == 0){
                      if(response.data.data.status == 100){
                          that.xianshang = false
                      }else{
                          that.xianshang = true
                      }
                      that.loadingcon = false

                      that.stats = response.data.data.status
            }else{
              that.$message.error(response.data.msg.info);
            }
          })
      },

			//修改佣金时执行全部佣金赋值并保存后重新获取一下列表和佣金
			fixallmoney:function(){
				var that = this;
				var formData = new FormData();
				formData.append("order_page_id",this.$route.query.id);
				formData.append("visible",this.moneyform.visible);
				formData.append("commission",this.moneyform.commission);
				formData.append("child_shop_ids",this.moneyform.child_shop_ids);

				axios.post('/api/gth/order-page/visible',formData)
					.then(response => {
						if(response.data.msg.code == 0){
							that.getmoneylist();
						}else{
							that.$message.error(response.data.msg.info);
						}
					})
			},
			//个性化编辑佣金
			fixmoney:function(id){
				this.$prompt('请输入金额', '提示', {
				  confirmButtonText: '确定',
				  cancelButtonText: '取消',
				}).then(response => {
					var that = this;
					var formData = new FormData();
					formData.append("order_page_id",this.$route.query.id);
					formData.append("child_shop_id",id);
					formData.append("commission",response.value);

					axios.post('/api/plan-market/order-page/commissions/update',formData)
						.then(response => {
							if(response.data.msg.code == 0){
								that.loading = true
								that.getmoneylist();
								that.$message({
								  message: '保存成功！',
								  type: 'success'
								});
							}else{
								that.$message.error(response.data.msg.info);
							}
						})
				})
			},
			//获取分销商和佣金
			getmoneylist:function(){
				var that = this;
				axios.get('/api/plan-market/order-page/commissions?_page_size=9999&order_page_id='+this.$route.query.id+'&name='+this.search)
					.then(response => {
						if(response.data.msg.code == 0){
              that.moneylist = response.data.data.data
							that.shoplist = response.data.data.data
							that.loading = false
						}else{
							that.$message.error(response.data.msg.info);
						}
					})
			},
      //获取分销商和佣金
      getmoneylist2:function(){
      	var that = this;
      	axios.get('/api/plan-market/order-page/commissions?_page_size=9999&order_page_id='+this.$route.query.id)
      		.then(response => {
      			if(response.data.msg.code == 0){
              that.moneylist = response.data.data.data
      			}else{
      				that.$message.error(response.data.msg.info);
      			}
      		})
      },


			//身份证审核
			cardid:function(){
          this.ids = [];
          if(this.moneyform.visible == 3 || this.moneyform.visible == 4){this.kejian = true}
          if(this.moneyform.visible == 1 || this.moneyform.visible == 2){this.kejian = false}
			},
			// //获取全部分销商
			// getdislist:function(){
			// 	var that = this;
			// 	axios.get('/api/gth/partner/list')
			// 		.then(response => {
			// 			if(response.data.msg.code == 0){
			// 				that.idslist = response.data.data.data
			// 			}else{
			// 				that.$message.error(response.data.msg.info);
			// 			}
			// 		})
			// },

      //保存提卡费
      savetikafei: async function(){
        await axios.post('/api/gth/tika/config',{page_id:this.$route.query.id,tika_cost:this.tika_cost})
        	.then(response => {
        		if(response.data.msg.code == 0){

        		}else{
        			that.$message.error(response.data.msg.info);
              return false
        		}
        	})
      },
      //获取提卡费
      gettikafei: async function(){
        var that = this
        await axios.get('/api/gth/tika/config?page_id='+this.$route.query.id)
        	.then(response => {
        		if(response.data.msg.code == 0){
              that.tika_cost = response.data.data
        		}else{
        			that.$message.error(response.data.msg.info);
              return false
        		}
        	})
      },
			//绑定佣金分销商
			bangding: async function(stat){
        await this.savetikafei();

				this.stat = stat
				var that = this;

        var newids = []
          for(var x=0;x<this.ids.length;x++){
            newids.push(this.ids[x].child_shop_id)
          }

				var formData = new FormData();
				formData.append("order_page_id",this.$route.query.id);
				formData.append("visible",this.moneyform.visible);
				formData.append("commission",this.moneyform.commission);
				formData.append("child_shop_ids",newids);
        formData.append("tika_cost",this.moneyform.tika_cost);

        if(this.$route.query.type==1||this.$route.query.type==2||this.$route.query.type==3){
          formData.append("is_notice", this.moneyform.is_notice);
        }

				axios.post('/api/plan-market/order-page/visible',formData)
					.then(response => {
						if(response.data.msg.code == 0){
              console.log('234')
                            //如果是下架状态
                            if(this.stats == 0){
                                    //如果是仅保存
                                    if(this.stat == 0){
                                        that.$message({
                                            message: '商品已修改！',
                                            type: 'success'
                                        });
                                        that.$router.push({
                                            path: '/productionDelivery',
                                        })
                                    }else{
                                        //如果是保存且上架
                                        axios.post('/api/gth/order-page/put-sale',{order_page_id:this.$route.query.id,status:100})
                                        	.then(response => {
                                        		if(response.data.msg.code == 0){
                                        			//绑定分销商成功后上架（落基进入审核）
                                        			if( this.shop_id == 50481 || this.shop_id == 304676){
                                        			        that.$message({
                                        			            message: '商品修改已发起审核！',
                                                                type: 'success'
                                        			        });
                                        			        that.$router.push({
                                        			            path: '/productionDelivery',
                                        			        })
                                        			}else{
                                                       that.$message({
                                                           message: '商品已修改！',
                                                           type: 'success'
                                                       });
                                                       that.$router.push({
                                                           path: '/productionDelivery',
                                                       })
                                        			}
                                        		}else{
                                        			that.$message.error(response.data.msg.info);
                                        		}
                                        	})
                                    }
                            }else{
                                //如果是上架状态
                                if( this.shop_id == 50481 || this.shop_id == 304676){
                                    that.$message({
                                        message: '商品修改已发起审核！',
                                        type: 'success'
                                    });
                                    that.$router.push({
                                        path: '/productionDelivery',
                                    })
                                }else{
                                    that.$message({
                                        message: '商品已修改！',
                                        type: 'success'
                                    });
                                    that.$router.push({
                                        path: '/productionDelivery',
                                    })
                                }
                            }
						}else{
							that.$message.error(response.data.msg.info);
						}
					})
			},
      //==================
      //打开选择分销商弹窗
      openchoosefx(from,item){
        this.fromtype = from
        this.isshowfxs = true
        this.fxtype = 1
        if(from==1){
          //编辑
          this.ids_t = JSON.parse(JSON.stringify(this.ids));
          console.log('编辑===')
          console.log(this.ids_t)
          //设置时候选中
          //给数组加ischecked
          this.moneylist = this.addischecked(this.moneylist)
        }else if(from==2){
          //指定规则
          if(item.type == 1){
            this.xin.config_id = 0
          }else{
            this.xin.config_id = item.id
          }
          this.xin.order_page_id = this.$route.query.id

          this.xin.child_shop_id = ""

          //获取列表genjuguize
          axios.get('/api/plan-market/order-page/commissions?_page_size=2000&order_page_id='+this.$route.query.id+'&config_id='+this.xin.config_id)
            .then(response => {
              if(response.data.msg.code == 0){
                // var arr = []
                // for(var x=0;x<response.data.data.data.length;x++){
                //   arr.push(response.data.data.data[x].child_shop_id)
                // }
                this.ids_t = response.data.data.data
                for(var x=0;x<this.ids_t.length;x++){
                  this.ids_t[x]['name'] = this.ids_t[x]['merchant_name']
                }
                console.log('佣金===')
                console.log(this.ids_t)
                //给数组加ischecked
                this.moneylist = this.addischecked(this.moneylist)
              }else{
                this.$message.error(response.data.msg.info);
              }
            })
          }else if(from==3){
            //不可见商户
                // var arr = []
                // for(var x=0;x<this.disablesee.length;x++){
                //   arr.push(this.disablesee[x].child_shop_id)
                // }
                this.ids_t = this.disablesee
                console.log('佣金===')
                console.log(this.ids_t)
                //给数组加ischecked
                this.moneylist = this.addischecked(this.moneylist)
          }


      },
      //给数组加ischecked
      addischecked(arr){
        for(var x=0;x<arr.length;x++){
          arr[x].ischecked = false
          for(var y=0;y<this.ids_t.length;y++){
            if(arr[x].child_shop_id==this.ids_t[y].child_shop_id){
              arr[x].ischecked = true
            }
          }
        }

        // for(var x=0;x<arr.length;x++){
        //   arr[x].ischecked = false
        // }

        // for(var y=0;y<this.ids_t.length;y++){
        //   for(var x=0;x<arr.length;x++){
        //     if(arr[x].child_shop_id==this.ids_t[y]){
        //       arr[x].ischecked = true
        //     }
        //   }
        // }



        return arr
      },
      //选择改变
      changechoose(e,item){
        // console.log(e)
        console.log(item)
        if(item=='全选'){
          if(this.fxtype==3){

            for(var y=0;y<this.fenzupeo.length;y++){

              this.fenzupeo[y].ischecked = e
              // 组-全选
              if(e){
                //全选
                if(!this.isarrhave(this.fenzupeo[y].child_shop_id)){
                  this.ids_t.push( {'child_shop_id':this.fenzupeo[y].child_shop_id,'name':this.fenzupeo[y].merchant_name})

                }
              }else{
                //全不选
                for(var x=0;x<this.ids_t.length;x++){
                  if(this.fenzupeo[y].child_shop_id==this.ids_t[x].child_shop_id){
                    this.ids_t.splice(x, 1)
                  }
                }
              }
            }
          }else if(this.fxtype==5){
            for(var y=0;y<this.fentagpeo.length;y++){

              this.fentagpeo[y].ischecked = e
              // 标签-全选
              if(e){
                //全选
                if(!this.isarrhave(this.fentagpeo[y].child_shop_id)){
                  this.ids_t.push({'child_shop_id':this.fentagpeo[y].child_shop_id,'name':this.fentagpeo[y].merchant_name})

                }
              }else{
                //全不选
                for(var x=0;x<this.ids_t.length;x++){
                  if(this.fentagpeo[y].child_shop_id==this.ids_t[x].child_shop_id){
                    this.ids_t.splice(x, 1)
                  }
                }
              }
            }
          }
        }else{
          if(e){
            //选中当前
            if(!this.isarrhave(item.child_shop_id)){
              this.ids_t.push({'child_shop_id':item.child_shop_id,'name':item.merchant_name})
            }
          }else{
            //取消当前
            for(var x=0;x<this.ids_t.length;x++){
              if(item.child_shop_id==this.ids_t[x].child_shop_id){
                this.ids_t.splice(x, 1)
              }
            }
          }
        }
      },
      //确认改变
      updatefx(){
        this.isshowfxs = false
        if(this.fromtype==1){
          //编辑
          this.ids = JSON.parse(JSON.stringify(this.ids_t));
        }else if(this.fromtype==2){
          //佣金
          console.log(this.ids_t)
          var newids = []
          for(var x=0;x<this.ids_t.length;x++){
            newids.push(this.ids_t[x].child_shop_id)
          }

          var form = {
            order_page_id: this.xin.order_page_id,
            child_shop_ids: newids.toString(),
            config_id: this.xin.config_id
          }

          axios.post('/api/plan-market/order-page/commissions/update/v2',form)
        	.then(response => {
        		if(response.data.msg.code == 0){
              if(response.data.data.length==0){
                this.$message({
                  message: '保存成功！',
                  type: 'success'
                });
              }else{
                this.$message.error(response.data.data[0]);
              }

              this.getfanli()

        		}else{
        			this.$message.error(response.data.msg.info);
        		}
        	})
        }else if(this.fromtype==3){

          // console.log(this.moneylist)
          // return
          var newids = []
          for(var x=0;x<this.ids_t.length;x++){
            newids.push(this.ids_t[x].child_shop_id)
          }
          //不可见
          var form = {
            child_shop_ids: newids.toString(),

          }

          axios.post('/api/plan-market/set/agent/invisible',form)
        	.then(response => {
        		if(response.data.msg.code == 0){
                this.$message({
                  message: '保存成功！',
                  type: 'success'
                });
              this.getdisablesee()

        		}else{
        			this.$message.error(response.data.msg.info);
        		}
        	})
        }
      },
      //判断是否存在该数据
      isarrhave(id){
        var ishave = false
        for(var x=0;x<this.ids_t.length;x++){
          if(id==this.ids_t[x]){
            ishave = true
          }
        }
        return ishave
      },
      //删除选中标签
      closetag(id){
        console.log(id)
        for(var x=0;x<this.ids_t.length;x++){
          if(id.child_shop_id==this.ids_t[x].child_shop_id){
            this.ids_t.splice(x, 1)
          }
        }
        for(var x=0;x<this.ids_t_s.length;x++){
          if(id.child_shop_id==this.ids_t_s[x].child_shop_id){
            this.ids_t_s.splice(x, 1)
          }
        }

        this.moneylist = this.checkedfalse(this.moneylist,id.child_shop_id)
        this.fenzupeo = this.checkedfalse(this.fenzupeo,id.child_shop_id)
        this.fentagpeo = this.checkedfalse(this.fentagpeo,id.child_shop_id)


      },

      //删除标签，将ischecked改false
      checkedfalse(arr,id){
        for(var x=0;x<arr.length;x++){
            if(arr[x].child_shop_id==id){
              arr[x].ischecked = false
            }
          }
          return arr
      },
      //通过id翻译名字
      fanyi(id){

        // for(var x=0;x<this.moneylist.length;x++){
        //   if(this.moneylist[x].child_shop_id==id){
        //       return this.moneylist[x].merchant_name
        //   }
        // }
      },
      //点击分类
      changetype(type){
        this.fxtype = type
        if(type==2){
          this.fxtypetitle = '按分组选'
          //获取组列表
          this.getzulist()
        }else if(type==4){
          this.fxtypetitle = '按标签选'
          //获取标签list
          this.gettaglist()
        }
        this.searchallpeo = ''
      },
      //返回tab
      backtab(){
        if(this.fxtype==2){
          this.fxtype=1
          //给数组加ischecked
          this.moneylist = this.addischecked(this.moneylist)
        }else if(this.fxtype==3){
          this.fxtype=2
          this.fxtypetitle = '按分组选'
          //获取组列表
          this.getzulist()
        }else if(this.fxtype==4){
          this.fxtype=1
          //给数组加ischecked
          this.moneylist = this.addischecked(this.moneylist)
        }else if(this.fxtype==5){
          this.fxtype=4
          this.fxtypetitle = '按标签选'
          //获取标签list
          this.gettaglist()
        }
        this.searchallpeo = ''
      },
      //获取组列表
      getzulist(){
        axios.get('/api/plan-market/reseller/group/list')
					.then(response => {
						if(response.data.msg.code == 0){
							console.log('分组')
							console.log(response)
							this.fx_type_list = response.data.data
						}else{
							this.$message.error(response.data.msg.info);
						}
					})

      },
      //获取标签list
      gettaglist(){
        axios.get('/api/plan-market/reseller/label/list')
					.then(response => {
						if(response.data.msg.code == 0){
							console.log('列表')
							console.log(response)
							this.fx_type_list = response.data.data
						}else{
							this.$message.error(response.data.msg.info);
						}
					})
        // this.fx_type_list = [
        //   {
        //     title:'xxx标签',
        //     num:18,
        //   },
        //   {
        //     title:'xxx标签',
        //     num:39,
        //   }
        //  ]
      },
      //组别或标签进成员
      getdetpeo(item){
        if(this.fxtype==2){
          //进组别成员
          this.fxtype=3
          this.fxtypetitle = item.title+'分组'

          axios.get('/api/plan-market/group/reseller/list',{
            params:{
              group_id:item.id
            }
          })
					.then(response => {
						if(response.data.msg.code == 0){

              // this.fenzupeo = [
              //   {
              //     child_shop_id:50495,
              //     merchant_name:'唯一1级',
              //     name:'唯一1级'
              //   },
              //   {
              //     child_shop_id:50440,
              //     merchant_name:'lin3',
              //     name:'lin3'
              //   }
              // ]
              this.fenzupeo = response.data.data
              for(var x=0;x< this.fenzupeo.length;x++){
                this.fenzupeo[x]['merchant_name'] = this.fenzupeo[x]['user_name']
              }
              console.log('分组成员')

              console.log(this.fenzupeo)

              //给数组加ischecked
              this.fenzupeo = this.addischecked(this.fenzupeo)
              this.allfzpeocheck = false
						}else{
							this.$message.error(response.data.msg.info);
						}
					})


        }else if(this.fxtype==4){
          //进标签成员
          this.fxtype=5
          this.fxtypetitle = '带有'+item.title+'标签的商户'

          axios.get('/api/plan-market/label/reseller/list',{
            params:{
              label_id:item.id
            }
          })
					.then(response => {
						if(response.data.msg.code == 0){

              // this.fentagpeo = [
              //   {
              //     child_shop_id:50510,
              //     merchant_name:'娜娜旗舰店1',
              //     name:'娜娜旗舰店1'
              //   },
              //   {
              //     child_shop_id:303050,
              //     merchant_name:'测试2',
              //     name:'测试2'
              //   }
              // ]
              this.fentagpeo = response.data.data
              for(var x=0;x< this.fentagpeo.length;x++){
                this.fentagpeo[x]['merchant_name'] = this.fentagpeo[x]['user_name']
              }
              console.log('标签成员')
							console.log(this.fentagpeo)
              //给数组加ischecked
              this.fentagpeo = this.addischecked(this.fentagpeo)
              this.alltagpeocheck = false
						}else{
							this.$message.error(response.data.msg.info);
						}
					})


        }
      },
      //已选成员筛选输入框
      shaitag(val){
        this.shaifun(this.ids_t,val)
      },
      //筛选方法
      shaifun(arr,font){
        var insearcharr = []
        for(var x = 0;x<arr.length;x++){
          if(arr[x].name.includes(font)){
            insearcharr.push(arr[x])
          }
        }
        this.ids_t_s = insearcharr
      },
      //筛选人员输入框
      shaipeo(val){
        if(this.fxtype==1){
          //全部
          this.shaipeofun(this.moneylist,val)
        }else if(this.fxtype==3){
          //组
          this.shaipeofun(this.fenzupeo,val)
        }else if(this.fxtype==5){
          //标签
          this.shaipeofun(this.fentagpeo,val)
        }
      },
      //筛选成员
      shaipeofun(arr,font){
        var insearcharr = []
        for(var x = 0;x<arr.length;x++){
          if(this.fxtype==1){
            if(arr[x].merchant_name.includes(font)){
              insearcharr.push(arr[x])
            }
          }
          if(this.fxtype==3||this.fxtype==5){
            if(arr[x].user_name.includes(font)){
              insearcharr.push(arr[x])
            }
          }

        }
        this.shaipeolist = insearcharr
      },
      //获取不可见list
      getdisablesee(){
        axios.get('/api/plan-market/order-page/shops?order_page_id='+this.$route.query.id)
					.then(response => {

						if(response.data.msg.code == 0){
							console.log('不可见列表')
							console.log(response.data.data.invisible_user)
							this.disablesee = response.data.data.invisible_user
						}else{
							this.$message.error(response.data.msg.info);
						}
					})
      },
		}

	}
</script>
<style scoped>
.t_choose_btn_box{
  display: flex;

}
.t_choose_type{
  background-color: #F2F2F2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 40px;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 10px;
  margin-top: 10px;
}
.t_choose_type img{
  height: 25px;
  margin-right: 10px;
}
.t_fx_item{
  margin-top: 28px;
  margin-bottom: 28px;
}
.t_fx_all{
  height: 300px;
  overflow: auto;
  border-right: 1px solid #E1E1E1;
  box-sizing: border-box;
}
.t_fenxiao_all{
  display: flex;
}
.t_fx_tab{
  width: 50%;
  box-sizing: border-box;
  padding: 10px;
}
.t_choose_tag{
  margin-right: 10px;
  margin-bottom: 10px;
}
.t_all_type_title{
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  margin-top: 10px;
}
.t_back_tab{
  cursor: pointer;
  position: absolute;
  left: 10px;
  top: 6px;
}
.t_type_list_item{
  display: flex;
  justify-content: space-between;
  padding: 10px 25px;
  box-sizing: border-box;
  cursor: pointer;
}
.t_out_tips_box{
  display: flex;
  align-items: center;
  margin-left: 20px;
}
.t_wen{
  background-color: #409EFF;
  color: white;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  margin-left: 10px;
  border-radius: 50%;
}
</style>
<style lang="scss" scoped>
	// .el-message-box__wrapper{ z-index: 20000 !important;}
  .shangjia /deep/ .el-form-item__label{ font-weight: bold; color:#FF0000;}
	.index{
		.add{
			text-align: right; position: relative;
			/deep/ .input-with-select{ width: 280px;}
			/deep/ .el-button{ position: absolute; right: 0px; top: 0px;}
		}
    .zidingyiflex{ display: flex;
        .zidingyitd{ flex:1; text-align: center; padding: 10px 10px; border: 1px #ccc solid; margin-left: -1px; margin-top: -1px; }
    }
    .bor3{border: 1px #EAEAEA solid; background: #EAEAEA; padding: 10px; border-radius: 3px; margin-bottom: 10px;}
    .bor4{border: 1px #EAEAEA solid; background: #EAEAEA; padding: 10px; border-radius: 3px; margin-bottom: 10px;}
    .newcon{ width: 800px; border: 1px #EAEAEA solid;
      .newflex{ display: flex;  justify-content: center; align-items: center; text-align: center; border-bottom: 1px #EAEAEA solid;
          .newflexli1{ flex: 2;
              .newflexli11{  flex: 1;  line-height: 36px; display: flex;  justify-content: center; align-items: center;}
              .newflexli12{  flex: 1; border-left: 1px #EAEAEA solid;
                  /deep/ .el-input{ width: 120px; margin: 5px 0;}
              }
          }
          .newflexli2{ flex: 1; border-left: 1px #EAEAEA solid;
              /deep/ .el-input{ width: 60%; margin: 5px 0;}
           }
          .newflex2{  display: flex;  justify-content: center; align-items: center;}
      }

    }

		.loglist{
			display: flex; justify-content: space-between; margin-bottom: 30px;
			.log_title{ padding: 7px 10px;}
		}
		.listl{ height: 350px; overflow: auto;
			/deep/ .el-input__inner{ border: none; text-align: center}
		}
		.list{

			display: flex; text-align: center; color: #727272; line-height: 45px; border: 1px #EAEAEA solid; margin-top: -1px;
			.th{ flex: 1; background: #F9F9F9; font-size: 14px; }
			.td{ flex: 1; font-size: 14px; border-right:1px #EAEAEA solid; }
		}
		.el-pagination{ text-align: right; margin: 20px 0}
		// .el-dialog__wrapper{ z-index: 2004 !important;}

		.protag{
			/deep/ .el-tag{ margin-right: 20px; margin-bottom: 20px;}
		}
		.addpro{
			//  width: 1166px;
			/deep/ .el-steps{   padding: 30px;}
      /deep/ .el-step__icon {
					width: 36px;
					height: 36px;
				}

				/deep/ .el-step__line {
					top: 17px;
				}

				/deep/ .is-process {
					color: #C0C4CC;
					border-color: #C0C4CC;
					font-weight: 400
				}
			.step{ margin-bottom: 20px; background: #FFFFFF;
				.redbor{
					/deep/ .el-input__inner{border: 1px #EEF7FF solid;}
				}
				.tilte{ background: #F9F9F9; padding-left: 30px; line-height: 45px; font-size: 14px;
					span{ background: #B1E4FF; color: #FFFFFF; float: right; line-height: 15px; cursor: pointer; padding: 5px 0; display: block; width: 24px; text-align: center; margin-right: 20px; margin-top: 8px; border-radius: 14px;}
				}
				.con{ background: #FFFFFF; padding: 35px;
					.flex{ display: flex;}
					.ori{ background: #FBFBFB; padding: 20px 10px;
						/deep/ .el-input{ width: 300px;}
						/deep/ .el-form-item{ margin-bottom: 20px;}
						/deep/ .el-form-item__label{ width: 150px !important;}

						.wenhao2{color: #999; font-size: 14px;}
						.no{
							display: flex; align-items: center;
							#drop{
								/deep/ .el-button--primary{ background: #409EFF}
							}
							.nonum{ background: #409EFF; padding: 0px 10px; line-height: 35px; height: 35px; color: #FFFFFF; border-radius: 3px; display: block;}
							.el-button{ }
							span{ margin: 0 20px;}
						}

					}
				}
				.haochi{ padding: 30px;
					/deep/ .el-select{ margin-left: 20px;}
				}
				.btm0 {
					/deep/ .el-button{ margin-left: 20px;}
					/deep/ .el-form-item{ margin-bottom: 0;}
				}
				.label200 .el-form-item__label{ width: 149px !important;}
				.avatar-uploader .el-upload {
					border: 1px dashed #d9d9d9;
					border-radius: 6px;
					cursor: pointer;
					position: relative;
					overflow: hidden;
				  }
				  .avatar-uploader .el-upload:hover {
					border-color: #409EFF;
				  }
				  .avatar-uploader-icon {
					font-size: 28px;
					color: #8c939d;
					width: 178px;
					height: 178px;
					line-height: 178px;
					text-align: center;
				  }
				  .avatar {
					width: 178px;
					height: 178px;
					display: block;
				  }
				.wenhao{ background: #B1E4FF; color: #FFFFFF; line-height: 15px; cursor: pointer; padding: 5px 11px; margin-left: 20px; text-align: center;  border-radius: 14px;}
			}

		}
	}
</style>
